﻿using System;
using System.Data;
using System.Text;
using System.IO;
using System.Xml;
using System.Collections;
using System.Windows.Forms;
using XISoft.AppCreator.Util.Common;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace XISoft.AppCreator.Util.ConfigHelper.DBConfig
{
    public class DBConfig
    {
        private readonly static ConfigHelper<DBConfigElement> config = new ConfigHelper<DBConfigElement>(System.Environment.CurrentDirectory + @"\config\DBConfig.config");

        /// 设置Config文件Keys的Value
        public static void Save()
        {
            config.Save();
        }
        public static DBConfigElement getDBConfig()
        {
            if (config.Elements.Count == 0)
            {
                MessageBox.Show("数据库配置找不到");
                return null;
            }
            return config.Elements[0];
        }

    }

}
